Cross-profiling for Java processors
نویسندگان
چکیده
ion with a boolean method isCacheHit(. . . ) that takes as argument a method identifier. The user has to provide an appropriate implementation of the CacheStrategy for the target processor. The UML class diagram in Figure 2 shows two concrete implementations, CacheJOP and CacheX. After consulting the configured CacheStrategy, the default implementation of EnterReturnProfiler invokes the CycleEstimator to compute the cycles consumed by the method invocation/return. In addition to a bytecode, getCycles(. . . ) also takes information about the method size and whether the method was found in the cache (for bytecodes other than method invocation/return, this extra information is meaningless and ignored by implementations of getCycles(. . . )). The cycle estimate is added to the cycle counter in the appropriate CCT node (i.e. in the caller node for method invocation, respectively, in the callee node for method return). For the method return pointcut, the instrumentation component exactly knows the return bytecode and passes it as argument to onMethodReturn(. . . ). However, for the method entry pointcut, the instrumentation component cannot always determine which invocation bytecode will be used by the caller. A method that is also declared in an interface may be called with the invokevirtual bytecode or with the invokeinterface bytecode. Furthermore, one use of invokespecial is to access a superclass’ version of a method (this mechanism is used to compile Java’s super() construct). That is, in certain cases the same method may be called by invokevirtual, invokeinterface, or invokespecial. However, as the CPU cycle consumption of the distinct method invocation bytecodes may differ, knowing that the concrete invocation bytecode can help improve the accuracy of cross-profiling. As general solution, we can pass the information regarding the method invocation bytecode from the caller to the callee as an extra method argument. For invocations of static methods, private methods, and constructors, the extra argument is not needed, because the invocation bytecode is statically known (both when instrumenting the caller method(s) and the callee method)∗∗. Note that in general, the method entry pointcut cannot be implemented by instrumenting the caller, because of polymorphic call sites (where the method identifier of the callee would not be known). In contrast, the method identifier of the caller is always known to the callee, since the caller passes its CCT node to the callee. Another issue is abnormal method completion through an exception. In this case, onMethod Return(. . . ) is not invoked. A general solution to this issue would be the introduction of another pointcut (corresponding to a method onMethodAbnormalCompletion(. . . ) in EnterReturnProfiler), which could be implemented by an inserted exception handler. In contrast to CProf, prevailing AOP frameworks, such as AspectJ [36], provides mechanisms for intercepting abnormal method completion. However, because exception throwing is infrequent in embedded Java software, CProf currently lacks such a mechanism. ∗∗The instrumentation component can statically determine whether a callee is private, since it processes all methods within the same class file, and private methods can only be called in the defining class. Constructor invocations are identified by the special method name 〈init〉. Copyright q 2009 John Wiley & Sons, Ltd. Softw. Pract. Exper. (2009)
منابع مشابه
Design and Performance Analysis of a Distributed Java Virtual Machine
ÐThis paper introduces DISK, a distributed Java Virtual Machine for networks of heterogenous workstations. Several research issues are addressed. A novelty of the system is its object-based, multiple-writer memory consistency protocol (OMW). The correctness of the protocol and its Java compliance is demonstrated by comparing the nonoperational definitions of Release Consistency, the consistency...
متن کاملProfile Detection Through Source Code Static Analysis
The present article reflects the progress of an ongoing master’s dissertation on language engineering. The main goal of the work here described, is to infer a programmer’s profile through the analysis of his source code. After such analysis the programmer shall be placed on a scale that characterizes him on his language abilities. There are several potential applications for such profiling, nam...
متن کاملAdding Hardware Support to the HotSpot Virtual Machine for Domain Specific Applications
Like real general-purpose processors, Java Virtual Machines (JVMs) need hardware acceleration for computationally intensive applications. JVMs however require that platform independence can be maintained while resorting to hardware acceleration. To this end, we invented a scheme to seamlessly add hardware support to Sun’s HotSpot JVM. By means of run-time profiling, we select the most heavily u...
متن کاملReal-time Java for Embedded Devices:
Hardware Java-specific processors have been shown to provide the performance benefits over their software counterparts that make Java a feasible environment for executing even the most computationally expensive systems. In most cases, the core of these processors is a simple stack machine on which stack operations and logic and arithmetic operations are carried out. More complex bytecodes are i...
متن کاملSoftware Profiling to Improve Network on Chip Performance
Network on chip (NoC) processors utilize network connections in place of traditional bus or cross bar interconnects in order to improve performance, power consumption, and scalability in modern multicore processors. However, superimposing a network onto a chip introduces additional factors, such as network latency, routing, and buffer depths all begin to affect the behavior of the system. Commu...
متن کاملA Distributed Java Virtual Machine For DSP Architectures
Java is for sure the most popular programming language today. Its popularity is based on the portability of the code and on the elegant programming framework provided by the language: built in garbage collection and multi-threaded support, easy Internet application development through socket streams, and last but not least familiar syntax. Even if a lot of work has already been done related to ...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
- Softw., Pract. Exper.
دوره 39 شماره
صفحات -
تاریخ انتشار 2009